package org.sklse.learningassistant.repository.resource.criteria;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;

/**
 * 比较符类型
 *
 * @author sen
 */
public interface Criterion {

    public enum Operator {
        EQ, NE, LIKE, GT, LT, GTE, LTE, AND, OR, IM
    }

    public Predicate toPredicate(Root<?> root, CriteriaQuery<?> query,
                                 CriteriaBuilder builder);

}

